﻿function editUserInfo() {
    var datas = $('#editUserInfo').serializeArray();
    var $alert = $('#alert');

    if ($alert.is(':visible'))
        $('#alert').css('visibility', 'hidden');

    $.post('edituserinfo', datas).success(function (res) {
        parent.refreash();
    }).error(function () {
        alert('服务员异常');
    });
}

$('#editUserInfo').validate({
    submitHandler: function (form) {
        editUserInfo();
        return;
    },
    messages: {
        email: '邮箱格式不正确',
        fullName: '用户姓名2-4个中文'
    }
})